// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:53:57


// Source File Name:   jp.java

package com.zelix;

import java.util.Hashtable;
import java.util.Vector;


//            hp, fh, dp, ep, 
//            vp, mt, ou, sx, 
//            qy, tb, mp

class jp extends hp {

    private boolean c;
    private String j;
    private boolean d;
    vp e;
    private fh f;
    private Hashtable g;
    private Vector h;
    private int i;

    jp(mp mp, boolean flag, String s, boolean flag1) {
        super(mp);
        g = new Hashtable();
        h = new Vector();
        c = flag;
        if (flag)
            e = new vp(0);
        j = s;
        d = flag1;
    }

    public String a(fh fh1, String s, dp dp1, Hashtable hashtable, qy qy1, boolean flag, Hashtable hashtable1,
                    Hashtable hashtable2, Hashtable hashtable3, boolean flag1) {
        String s3;
        mt mt1;
        boolean flag2;
        flag2 = tb.b;
        s3 = dp1.b();
        mt1 = fh1.c();
        if (d) {
            Vector vector = qy1.d(s3);
            if (vector != null) {
                for (int k = 0; k < vector.size(); k++) {
                    String s1 = (String) vector.elementAt(k);
                    dp dp2 = new dp(s1, s3);
                    if (!dp2.equals(dp1) && !hashtable1.containsKey(dp2) && !super.b.b(dp2) && !super.b.a(fh1, dp2, dp1)) {
                        ou ou1 = (ou) hashtable.get(dp2);
                        if (ou1 != null) {
                            mt mt2 = mt1.a(ou1);
                            if (mt2 == null)
                                return s1;
                        }
                    }
                }
            }
        }
        String s2 = a(fh1, s, dp1, hashtable, flag, hashtable1, hashtable2, hashtable3, flag1);
        qy1.b(s3, s2);
        return s2;
    }

    private sx a() {
        sx sx1;
        label0:
        {
            if (i >= h.size()) {
                sx1 = new sx(0);
                h.addElement(sx1);
                if (!tb.b)
                    break label0;
            }
            sx1 = (sx) h.elementAt(i);
            sx1.a(0);
        }
        i++;
        return sx1;
    }

    String a(fh fh1, String s) {
        if (fh1 != f) {
            g.clear();
            f = fh1;
            i = 0;
        }
        sx sx1 = (sx) g.get(s);
        if (sx1 == null) {
            sx1 = a();
            g.put(s, sx1);
        }
        int k = sx1.b();
        sx1.c();
        if (c) {
            String s1 = null;
            do {
                s1 = e.a(k, j);
                if (s1 == null) {
                    k = sx1.b();
                    sx1.c();
                }
            } while (s1 == null);
            return s1;
        } else {
            return (j == null ? "" : j) + String.valueOf(k);
        }
    }
}